package com.api.fc;
//会议归档写建模的api

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import weaver.conn.RecordSet;
import weaver.file.ImageFileManager;
import weaver.upgradetool.wscheck.Util;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Path("/fc_down")
public class fc_down {
    //    private Logger logger = LoggerFactory.getLogger(Hygdxjm.class);
    private RecordSet rs = new RecordSet();

    @POST
    @Path("/by_imagefileid")
    @Produces(MediaType.APPLICATION_JSON)
    public static InputStream getFile (@Context HttpServletRequest request, @Context HttpServletResponse response) {
        String imagefileid0=request.getParameter("imagefileid");
        int imagefileid=Integer.valueOf(imagefileid0);
        ImageFileManager imageFileManager = new ImageFileManager();
        imageFileManager.getImageFileInfoById(imagefileid);
        InputStream inputStream = imageFileManager.getInputStream();
        return inputStream;
    }
}